﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Scripts/jquery-1.10.2.min.js"></script>
    <script>
        function GetAll() {
            $.ajax({
                url: "/api/Products",
                type: "GET",
                dataType: "json",
                success: function (data) {
                    for (var i = 0; i < data.length; i++) {
                        $("#list").append("<h3>" + data[i].Name + "</h3>");
                        $("#list").append("<p>价格：" + data[i].Price + "</p>");
                    }
                }
            });
        }

        $(function () {
            GetAll();
        });
    </script>
</head>
<body>
    <div id="list" style=" border-bottom :1px dashed silver ;"></div>
</body>
</html>
